package com.iknow.db;

import android.content.Context;
import android.database.Cursor;
import com.iknow.data.Word;
import com.iknow.util.StringUtil;

public class IKStrangeWordTable
{
  public static final String AUDIO_URL = "audioUrl";
  public static final String CREATE_TABLE = "create table T_BD_STRANGEWORD (key text primary key on conflict replace, user_id text,type text, audioUrl text, pron text, def text, description text, familiarity text, memo text, lang text, date text)";
  public static final String DATE = "date";
  public static final String DEF = "def";
  public static final String DESCRIPTION = "description";
  public static final String FAMILIARITY = "familiarity";
  public static final String KEY = "key";
  public static final String LANG = "lang";
  public static final String MEMO = "memo";
  public static final String PRON = "pron";
  public static final String SYCN_FLAG = "sycn_flag";
  public static final String[] TABLE_COLUMNS;
  public static final String TABLE_NAME = "T_BD_STRANGEWORD";
  public static final String TAG = "IKStrangeWordTable";
  public static final String TYPE = "type";
  public static final String USER_ID = "user_id";
  protected Context ctx;

  static
  {
    String[] arrayOfString = new String[11];
    arrayOfString[0] = "key";
    arrayOfString[1] = "user_id";
    arrayOfString[2] = "type";
    arrayOfString[3] = "audioUrl";
    arrayOfString[4] = "pron";
    arrayOfString[5] = "def";
    arrayOfString[6] = "description";
    arrayOfString[7] = "familiarity";
    arrayOfString[8] = "memo";
    arrayOfString[9] = "lang";
    arrayOfString[10] = "date";
    TABLE_COLUMNS = arrayOfString;
  }

  public static Word paseWordInfo(Cursor paramCursor)
  {
    Object localObject;
    if ((paramCursor == null) || (paramCursor.getCount() == 0))
      localObject = null;
    while (true)
    {
      return localObject;
      Word localWord = new Word();
      localWord.setKey(paramCursor.getString(paramCursor.getColumnIndex("key")));
      localWord.setUserId(paramCursor.getString(paramCursor.getColumnIndex("user_id")));
      localWord.setPron(paramCursor.getString(paramCursor.getColumnIndex("pron")));
      localWord.setLang(paramCursor.getString(paramCursor.getColumnIndex("type")));
      localWord.setWordMemo(paramCursor.getString(paramCursor.getColumnIndex("memo")));
      localWord.setDef(paramCursor.getString(paramCursor.getColumnIndex("def")));
      localWord.setAudioUrl(paramCursor.getString(paramCursor.getColumnIndex("audioUrl")));
      localWord.setCreateDate(StringUtil.StrToDate(paramCursor.getString(paramCursor.getColumnIndex("date"))));
      localObject = localWord;
    }
  }
}